package com.example.service.impl;

import com.example.mapper.OrderDetailsMapper;
import com.example.mapper.OrderMapper;
import com.example.pojo.Order;
import com.example.pojo.OrderDetails;
import com.example.pojo.PageBean;
import com.example.service.OrderDetailsService;
import com.example.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderDetailsServiceImpl implements OrderDetailsService {
    @Autowired
    private OrderDetailsMapper orderDetailsMapper;

    @Override
    public void changeOrderDetails(OrderDetails orderDetails) {
        orderDetailsMapper.changeOrderDetails(orderDetails);
    }

    @Override
    public void addOrderDetails(List<OrderDetails> orderDetails) {
        orderDetailsMapper.addOrderDetails(orderDetails);
    }

    @Override
    public void deleteOrderDetails(String id) {
        orderDetailsMapper.deleteOrderDetails(id);
    }

    @Override
    public List<OrderDetails> getDetails(Integer id) {
        return orderDetailsMapper.getDetails(id);
    }
}
